/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "t_channelversions")
//@NamedQueries({@NamedQuery(name = "TChannelversions.findAll", query = "SELECT t FROM TChannelversions t"), @NamedQuery(name = "TChannelversions.findByChannelversionid", query = "SELECT t FROM TChannelversions t WHERE t.channelversionid = :channelversionid"), @NamedQuery(name = "TChannelversions.findByServiceCode", query = "SELECT t FROM TChannelversions t WHERE t.serviceCode = :serviceCode"), @NamedQuery(name = "TChannelversions.findByVersion", query = "SELECT t FROM TChannelversions t WHERE t.version = :version"), @NamedQuery(name = "TChannelversions.findByCreateddate", query = "SELECT t FROM TChannelversions t WHERE t.createddate = :createddate"), @NamedQuery(name = "TChannelversions.findByActivedate", query = "SELECT t FROM TChannelversions t WHERE t.activedate = :activedate")})
public class TChannelversions implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "channelversionid")
    private String channelversionid;
    @Column(name = "service_code")
    private String serviceCode;
    @Basic(optional = false)
    @Column(name = "version")
    private int version;
    @Column(name = "createddate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createddate;
    @Column(name = "activedate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date activedate;

    public TChannelversions() {
    }

    public TChannelversions(String channelversionid) {
        this.channelversionid = channelversionid;
    }

    public TChannelversions(String channelversionid, int version) {
        this.channelversionid = channelversionid;
        this.version = version;
    }

    public String getChannelversionid() {
        return channelversionid;
    }

    public void setChannelversionid(String channelversionid) {
        this.channelversionid = channelversionid;
    }

    public String getServiceCode() {
        return serviceCode;
    }

    public void setServiceCode(String serviceCode) {
        this.serviceCode = serviceCode;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public Date getCreateddate() {
        return createddate;
    }

    public void setCreateddate(Date createddate) {
        this.createddate = createddate;
    }

    public Date getActivedate() {
        return activedate;
    }

    public void setActivedate(Date activedate) {
        this.activedate = activedate;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (channelversionid != null ? channelversionid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TChannelversions)) {
            return false;
        }
        TChannelversions other = (TChannelversions) object;
        if ((this.channelversionid == null && other.channelversionid != null) || (this.channelversionid != null && !this.channelversionid.equals(other.channelversionid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.TChannelversions[channelversionid=" + channelversionid + "]";
    }

}
